unit u_pesquisafornecedor;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, u_pesquisapadrao, FMTBcd, DB, DBClient, Provider, SqlExpr,
  Grids, DBGrids, JvExDBGrids, JvDBGrid, StdCtrls, AdvEdit, AdvGlowButton,
  ExtCtrls, AdvGroupBox;

type
  TFRM_PesquisaFornecedor = class(TFRM_PesquisaPadrao)
    cdsPesquisarCOD_FORNECEDOR: TIntegerField;
    cdsPesquisarRAZAO_SOCIAL: TStringField;
    cdsPesquisarNOME_FANTASIA: TStringField;
    cdsPesquisarCNPJ: TStringField;
    procedure edtPesquisarKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    procedure FormShow(Sender: TObject);

  end;

var
  FRM_PesquisaFornecedor: TFRM_PesquisaFornecedor;

implementation

{$R *.dfm}

procedure TFRM_PesquisaFornecedor.edtPesquisarKeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
  inherited;
  cdsPesquisar.Locate('nome_fantasia',edtPesquisar.Text,[loPartialKey,loCaseInsensitive]);
end;

procedure TFRM_PesquisaFornecedor.FormShow(Sender: TObject);
begin
  inherited;
  lblTotal.Caption := lblTotal.Caption + ' fornecedores';
end;

end.
